SetOptions
The SetOptions API allows users to configure various options for an existing Stellar account.
Method: POST
{{URL}}/jsonrpc
Headers
| Name | Value | 
|---|---|
| Content-Type | application/json | 
Example
Response Parameters
| Parameter | Description | 
|---|---|
SourceAccount  | Object  | 
PublicKey Mandatory  | String The public key of the account for which the options are being set. Ex: "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW"  | 
PrivateKey Mandatory  | String The private key associated with the source account for authentication. Ex: ""  | 
SetFlags  | Object  | 
authRequired Mandatory  | Boolean Indicates whether the account requires authorization for trustlines. Ex: true  | 
authRevocable Mandatory  | Boolean Specifies if the account can be revoked by the issuer. Ex: true  | 
authImmutable Mandatory  | Boolean Indicates if the account's authorization flag can be changed in the future. Ex: true  | 
authClawbackEnabled Mandatory  | Boolean Specifies if the issuer can claw back or recover assets from the account. Ex: true  | 
ClearFlags  | Object  | 
authRequired Mandatory  | Boolean Indicates whether the account requires authorization for trustlines. Setting it to false clears this flag. Ex: false  | 
authRevocable Mandatory  | Boolean Specifies if the account can be revoked by the issuer. Ex: false  | 
authImmutable Mandatory  | Boolean Indicates if the account's authorization flag can be changed in the future. Ex: false  | 
authClawbackEnabled Mandatory  | Boolean Specifies if the issuer can claw back or recover assets from the account. Ex: false  | 
sponser  | Object  | 
publicKey Mandatory  | String The public key of the account acting as the sponsor for the transaction fee. Ex: "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3"  | 
PrivateKey Mandatory  | String The private key associated with the sponsor account for authentication. Ex: ""  | 
Body
{
    "SourceAccount": {
        "PublicKey": "GCPLZXWATKYY3OXXHDOU3TSIUNZA5ZVBMM6P6ONGZQJHICXSFGFWNBPW",
        "PrivateKey": ""
    },
    "SetFlags" {
        "authRequired": true,
        "authRevocable": true,
        "authImmutable": true,
        "authClawbackEnabled": true
    },
    "ClearFlags": {
        "authRequired": false,
        "authRevocable": false,
        "authImmutable": false,
        "authClawbackEnabled": false
    },
    "sponser": {
        "publicKey": "GAUMO2B3RA6HRNDEVZUZAV5ZP2YE5V37UZTIFMKKRAH2IK5XDTZBJCZ3",
        "PrivateKey": ""
    }
}
Response: 200
Response Parameters
| Parameter | Description | 
|---|---|
hash  | String A unique identifier representing the transaction hash of the SetOptions operation. Ex: "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"  | 
{
    "hash": "fbef2e61b8961114a285a8d1ba9c20076f13f636db4fc452dae64bf763390724"
}